package inventario.grafica;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

import com.cloudgarden.resource.SWTResourceManager;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class MenuPrinc extends org.eclipse.swt.widgets.Composite {
	private Text welcome;
	private Text uishuaihsiu;
	private Text salas;
	private Button sair;
	private Button procuraSala;
	private Button cadastraSala;
	private Button procuraEquipamento;
	private Button carregaEquipamento;
	private Button cadastraEquipamento;
	private Button procuraPessoa;
	private Button cadastraPessoa;
	private Text equipamentos;

	{
		//Register as a resource user - SWTResourceManager will
		//handle the obtaining and disposing of resources
		SWTResourceManager.registerResourceUser(this);
	}

	public MenuPrinc(Composite parent, int style) {
		super(parent, style);
		initGUI();
	}
	
	/**
	* Initializes the GUI.
	*/
	private void initGUI() {
		try {
			//this.setSize(612, 461);
			this.setSize(new org.eclipse.swt.graphics.Point(612, 461));
			this.setBackground(SWTResourceManager.getColor(172, 203, 158));
			FormLayout thisLayout = new FormLayout();
			this.setLayout(thisLayout);
			{
				sair = new Button(this, SWT.PUSH | SWT.CENTER);
				FormData sairLData = new FormData();
				sairLData.left =  new FormAttachment(0, 1000, 276);
				sairLData.top =  new FormAttachment(0, 1000, 414);
				sairLData.width = 60;
				sairLData.height = 25;
				sair.setLayoutData(sairLData);
				sair.setText("Sair");
				sair.setBackground(SWTResourceManager.getColor(172, 203, 158));
			}
			{
				procuraSala = new Button(this, SWT.PUSH | SWT.CENTER);
				FormData procuraSalaLData = new FormData();
				procuraSalaLData.left =  new FormAttachment(0, 1000, 113);
				procuraSalaLData.top =  new FormAttachment(0, 1000, 344);
				procuraSalaLData.width = 77;
				procuraSalaLData.height = 25;
				procuraSala.setLayoutData(procuraSalaLData);
				procuraSala.setText("Procura Sala");
				procuraSala.setBackground(SWTResourceManager.getColor(172, 203, 158));
			}
			{
				cadastraSala = new Button(this, SWT.PUSH | SWT.CENTER);
				FormData cadastraSalaLData = new FormData();
				cadastraSalaLData.left =  new FormAttachment(0, 1000, 113);
				cadastraSalaLData.top =  new FormAttachment(0, 1000, 304);
				cadastraSalaLData.width = 82;
				cadastraSalaLData.height = 25;
				cadastraSala.setLayoutData(cadastraSalaLData);
				cadastraSala.setText("Cadastra Sala");
				cadastraSala.setBackground(SWTResourceManager.getColor(172, 203, 158));
			}
			{
				procuraEquipamento = new Button(this, SWT.PUSH | SWT.CENTER);
				FormData procuraEquipamentoLData = new FormData();
				procuraEquipamentoLData.left =  new FormAttachment(0, 1000, 350);
				procuraEquipamentoLData.top =  new FormAttachment(0, 1000, 230);
				procuraEquipamentoLData.width = 127;
				procuraEquipamentoLData.height = 25;
				procuraEquipamento.setLayoutData(procuraEquipamentoLData);
				procuraEquipamento.setText("Procura Equipamento");
				procuraEquipamento.setBackground(SWTResourceManager.getColor(172, 203, 158));
			}
			{
				carregaEquipamento = new Button(this, SWT.PUSH | SWT.CENTER);
				FormData carregaEquipamentoLData = new FormData();
				carregaEquipamentoLData.left =  new FormAttachment(0, 1000, 350);
				carregaEquipamentoLData.top =  new FormAttachment(0, 1000, 189);
				carregaEquipamentoLData.width = 191;
				carregaEquipamentoLData.height = 25;
				carregaEquipamento.setLayoutData(carregaEquipamentoLData);
				carregaEquipamento.setText("Carregar Equipamento do Arquivo");
				carregaEquipamento.setBackground(SWTResourceManager.getColor(172, 203, 158));
			}
			{
				cadastraEquipamento = new Button(this, SWT.PUSH | SWT.CENTER);
				FormData cadastraEquipamentoLData = new FormData();
				cadastraEquipamentoLData.left =  new FormAttachment(0, 1000, 350);
				cadastraEquipamentoLData.top =  new FormAttachment(0, 1000, 147);
				cadastraEquipamentoLData.width = 132;
				cadastraEquipamentoLData.height = 25;
				cadastraEquipamento.setLayoutData(cadastraEquipamentoLData);
				cadastraEquipamento.setText("Cadastra Equipamento");
				cadastraEquipamento.setBackground(SWTResourceManager.getColor(172, 203, 158));
			}
			{
				procuraPessoa = new Button(this, SWT.PUSH | SWT.CENTER);
				FormData procuraPessoaLData = new FormData();
				procuraPessoaLData.left =  new FormAttachment(0, 1000, 113);
				procuraPessoaLData.top =  new FormAttachment(0, 1000, 188);
				procuraPessoaLData.width = 92;
				procuraPessoaLData.height = 25;
				procuraPessoa.setLayoutData(procuraPessoaLData);
				procuraPessoa.setText("Procura Pessoa");
				procuraPessoa.setBackground(SWTResourceManager.getColor(172, 203, 158));
			}
			{
				cadastraPessoa = new Button(this, SWT.PUSH | SWT.CENTER);
				FormData cadastraPessoaLData = new FormData();
				cadastraPessoaLData.left =  new FormAttachment(0, 1000, 113);
				cadastraPessoaLData.top =  new FormAttachment(0, 1000, 147);
				cadastraPessoaLData.width = 97;
				cadastraPessoaLData.height = 25;
				cadastraPessoa.setLayoutData(cadastraPessoaLData);
				cadastraPessoa.setText("Cadastra Pessoa");
				cadastraPessoa.setBackground(SWTResourceManager.getColor(172, 203, 158));
			}
			{
				equipamentos = new Text(this, SWT.NONE);
				FormData equipamentosLData = new FormData();
				equipamentosLData.left =  new FormAttachment(0, 1000, 338);
				equipamentosLData.top =  new FormAttachment(0, 1000, 106);
				equipamentosLData.width = 95;
				equipamentosLData.height = 19;
				equipamentos.setLayoutData(equipamentosLData);
				equipamentos.setText("Equipamentos");
				equipamentos.setBackground(SWTResourceManager.getColor(172, 203, 158));
				equipamentos.setFont(SWTResourceManager.getFont("Segoe UI", 10, 0, false, false));
			}
			{
				salas = new Text(this, SWT.NONE);
				FormData salasLData = new FormData();
				salasLData.left =  new FormAttachment(0, 1000, 91);
				salasLData.top =  new FormAttachment(0, 1000, 270);
				salasLData.width = 39;
				salasLData.height = 22;
				salas.setLayoutData(salasLData);
				salas.setText("Salas");
				salas.setFont(SWTResourceManager.getFont("Segoe UI", 10, 0, false, false));
				salas.setBackground(SWTResourceManager.getColor(172, 203, 158));
			}
			{
				uishuaihsiu = new Text(this, SWT.NONE);
				FormData uishuaihsiuLData = new FormData();
				uishuaihsiuLData.left =  new FormAttachment(0, 1000, 91);
			uishuaihsiuLData.top =  new FormAttachment(0, 1000, 106);
				uishuaihsiuLData.width = 52;
				uishuaihsiuLData.height = 19;
				uishuaihsiu.setLayoutData(uishuaihsiuLData);
				uishuaihsiu.setText("Pessoa");
				uishuaihsiu.setBackground(SWTResourceManager.getColor(172, 203, 158));
				uishuaihsiu.setFont(SWTResourceManager.getFont("Segoe UI", 10, 0, false, false));
			}
			{
				welcome = new Text(this, SWT.NONE);
				FormData welcomeLData = new FormData();
				welcomeLData.left =  new FormAttachment(0, 1000, 40);
				welcomeLData.top =  new FormAttachment(0, 1000, 32);
				welcomeLData.width = 198;
				welcomeLData.height = 23;
				welcome.setLayoutData(welcomeLData);
				welcome.setText("Bem-vindo, administrador");
				welcome.setBackground(SWTResourceManager.getColor(172, 203, 158));
				welcome.setFont(SWTResourceManager.getFont("Segoe UI Semibold", 12, 0, false, false));
			}
			this.layout();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	/**
	* Auto-generated main method to display this 
	* org.eclipse.swt.widgets.Composite inside a new Shell.
	*/
	public static void main(String[] args) {
		Display display = Display.getDefault();
		Shell shell = new Shell(display);
		MenuPrinc inst = new MenuPrinc(shell, SWT.NULL);
		Point size = inst.getSize();
		shell.setLayout(new FillLayout());
		shell.layout();
		if(size.x == 0 && size.y == 0) {
			inst.pack();
			shell.pack();
		} else {
			Rectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);
			shell.setSize(shellBounds.width, shellBounds.height);
		}
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
	}

}
